<template id="resumeList">
  <div>
    <ul>
      <li class="_item" @click="link_bank">
        <div class="newjob_item_row clearfix">
          <span class="job_name overflow">
            <span :class="[sfjpgw ==='1'?'bgPic':'']">{{job}}</span>
          </span>
          <!-- <span class="job_money overflow" v-if="ygxs != '40'">
            <span class="num">{{money}}</span>/月 -->
          <span class="job_money overflow">
            <span class="num">{{money}}</span>
          </span>
          <!-- <span class="job_money overflow" v-else>
            <span class="num">小时工</span>
          </span> -->
        </div>
        <div class="newjob_item_row last_row clearfix">
          <span class="newjob_left company">{{company}}</span>
          <span class="data overflow">{{djsj}}</span>
        </div>
        <div v-show="jobNoitce">
          <p class="newjob_item_row address clearfix" v-if="_item &&_item.msrq">
            面试时间：{{_item?_item.msrq:''}}
          </p>
          <p class="newjob_item_row address clearfix" v-if="_item &&_item.lxr">
            联系人：{{_item?_item.lxr:''}}
          </p>
          <p class="newjob_item_row address clearfix" v-if="_item &&_item.lxdh">
            联系电话：{{_item?_item.lxdh:''}}
          </p>
          <p class="newjob_item_row address clearfix" v-if="_item &&_item.msdz">
            面试地址：{{_item?_item.msdz:''}}
          </p>
          <p class="newjob_item_row last_row clearfix">
            {{_item?_item.mstznr:''}}
          </p>
        </div>
        <i class="iconfont icon-arrow-down" :class="[jobNoitce?'icon-arrow-up':'']" v-if="_item"></i>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: "resumeList",
  props: {
    job: {
      type: String
    },
    money: {
      type: String
    },
    company: {
      type: String
    },
    djsj: {
      type: String
    },
    dwdjid: {
      type: String
    },
    jlid: {
      type: String
    },
    zpgwid: {
      type: String
    },
    count: {
      type: String
    },
    // ygxs: {
    //   type: String
    // },
    sftxtdjl: {
      type: String
    },
    sfjpgw:{
      type: String
    },
    scid:{
      type: String
    },
    _item:{
      type: Object
    }
  },
  data() {
    return {
      jobNoitce: false,
    }
  },
  methods: {
    send(jlid, gwid, sftxtdjl) {
      this.$emit("input", {
        jlid: jlid,
        zpgwid: gwid,
        sftxtdjl: sftxtdjl
      });
    },
    link_bank() {
      if(this._item){
        if (!this.jobNoitce) {
          this.$loading = true;
          this.$http.post("/grgl/jlckBc", {txcklx:'20',ckjlid: this._item.mstzid})
            .then(res => {
              const data = res.returnData;
              if (+data.executeResult === 1) {
                this.jobNoitce = !this.jobNoitce;
              }
            })
            .finally(() => {
              this.$loading = false;
            });
        }else {
          this.jobNoitce = !this.jobNoitce;
        }
      }else{
        if (this._item) {
          this.$emit("link", this.zpgwid, this.dwdjid, this._item);
        }else if(this.scid){
          this.$emit("link", this.zpgwid, this.dwdjid, this.scid);
        } else {
          this.$emit("link", this.zpgwid, this.dwdjid);
        }
      }
    }
  }
};
</script>
<style lang="scss" scoped>
@import "~common/scss/var.scss";
._item {
  // height: $height-input * 2;
  margin: $height-base/10 0;
  border-radius: $radius-base3;
  background-color: #fff;
  padding: $font-size-base 0 $margin-base 0;
  position: relative;
  .newjob_item_row {
    padding: 0 $padding-btn;
    margin-bottom: $margin-base;
    .data {
        color: $color-text-label;
        font-size: $font-size-mini;
        float: right;
        width: 30%;
        height: $height-width_line * 2;
        line-height: $height-width_line * 2;
        text-align: right;
      }
    .job_name {
      color: $color-text-title;
      font-weight: 400;
      width: 65%;
      height: 40px;
      line-height: 40px;
      float: left;
      .bgPic {
        background: url("~common/images/want.png") top right no-repeat;
        background-size: $font-size-large;
        padding-right: $font-size-larges;
      }
    }
    .job_money {
      float: right;
      color: #817e81;
      font-size: $font-size-small;
      width: 35%;
      text-align: right;
      word-wrap: break-word;
      .num {
        color: #fb4d64;
        // font-size: $font-size-large;
        font-size: $font-size-base;
      }
    }
    .newjob_left {
      float: left;
      font-size: $font-size-small;
      color: $color-text-title;
      // height: $height-width_line * 2;
      // line-height: $height-width_line * 2;
    }
    .newjob_right {
      float: right;
      background-color: #ff9900;
      padding: $radius-base;
      width: $radius-base4 * 4;
      box-sizing: border-box;
      color: #fff;
      font-size: $padding-base-half * 3;
      border-radius: $padding-base-half;
      a {
        color: #fff;
      }
    }
    .phone {
      background-color: #3399ff;
    }
    .company {
      background: url("~common/images/company.png") 0 $padding-base-half
        no-repeat;
      background-size: $height-input_base;
      padding-left: $padding-base-half * 4;
      padding-top: $padding-base-half;
      width: 64%;
    }
  }
  .last_row {
    margin-bottom: 0;
  }
}
._item:first-child {
  border-radius: 0 0 $radius-base3 $radius-base3;
  margin-top: 0;
}
i{
  position: absolute;
  left: 50%;
  margin-left: -25px;
  text-align: center;
  color: #444;
  font-weight: bold;
  bottom: 0;
  height: 30px;
  line-height: 30px;
  width: 50px;
}
.address{
  margin-top: 10px;
  white-space:normal;
  word-break:break-all;
}
</style>
